<%@ page import="java.sql.*,database.*"%>
<%
try
	{
              int result = new DBCon().insertProfessor(
                    request.getParameter("fn"),
                    request.getParameter("mn"),
					request.getParameter("ln"),
                    request.getParameter("dpt"),
                    request.getParameter("deg"),
                    request.getParameter("email"),
                    request.getParameter("wp"),
                    request.getParameter("mp"),
                    request.getParameter("hp"),
                    request.getParameter("UserName"),
                    request.getParameter("PassWord"),
                    request.getParameter("enrol"));
			if (result == 0)
				response.sendRedirect("../index.jsp");
			else if (result == 1)
				response.sendRedirect("../Prof");
			//response.sendRedirect("../Proff/index.jsp");
}
catch(Exception e)
{
    response.sendRedirect("../connectionFailed.jsp");
}
%>
<%%>